package com.apes.auto.car.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.comment.Comment;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * @ClassName EmissionStandard
 * @Description 排放标准对照表
 * @Author pengyb
 * @Date 2019/7/11 16:17
 * @Version 1.0
 **/
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = AutoEmissionStandard.CONST_TABLE_NAME,indexes = {
        @Index(columnList = "name")
})
public class AutoEmissionStandard extends Model {
    public static final String CONST_TABLE_NAME = "auto_mission_standard";

    @Id
    @Column(name = "id", length = 30)
    @Comment("排放标准编码")
    private String id;  //编码

    @Column(name = "name", length = 32)
    @Comment("排放标准")
    private String name;// 名称
}
